public class BestForStorePricing extends ComplexPricing {

	private ISalePricing pricing;
	
	public BestForStorePricing(ISalePricing pricing){
		this.pricing = pricing;
	}
	
	public double getTotal(Sale sale) {
		sale.setPricing(pricing);
		double highest = 0;
			for(ISalePricing z: pricings){
				if(z.getTotal(sale)>highest){
					highest = z.getTotal(sale);
				}
				System.out.println(z.getTotal(sale));
			}
		return highest;
	}
	
}
